1. Technical Field
The disclosure relates to electronic devices, and more particularly to an electronic device system capable of sharing configuration parameters among processes.
2. Description of Related Art
The extensible markup language (XML) is commonly utilized to organize various software parameters as a document. An application may invoke functions or relative libraries to analyze XML documents to retrieve parameters. Since the parameters may be proprietary to an application, sharing of the parameters with other applications or with an operating system kernel is difficult.
With reference to FIG. 1, a main memory 100 comprises a user space and a kernel space. Applications 10a-10b and a document 12 of configuration parameters are located in the user space while an operating system kernel is located in the kernel space. When an application accesses the configuration parameters, the application parses the document 12 to rearrange the configuration parameters in a tree structure, referred to as a configuration tree, such as trees 11a-11c in FIG. 1, according to an interior structure of the document. Each node of the configuration tree records a parameter value. The application allocates the configuration tree in a private area of the application which is unknown and inaccessible by other programs. This underlies the difficulty of parameters synchronization or sharing among processes.
Sharing of configuration parameters among applications, however, is necessary in some circumstances. In an example of an asymmetric digital subscriber line (ADSL) modem, after a program utilizes point-to point protocol (PPP) or dynamic host configuration protocol (DHCP) to acquire an internet protocol (IP) address, other programs in the modem, such as a network address translation (NAT) program and/or a firewall program may require retrieval of the IP address. Configuration trees in FIG. 1 hinder configuration parameter sharing or synchronization among programs. Additionally, an operating system kernel 13 in FIG. 1 may face similar difficulty in accessing configuration trees or configuration parameter documents.